@use '@scss/common' as *;

.console {
  overflow: auto;
  max-height: min(800px, 60vh);
  padding: calc(var(--base) * 1.5);
  border: 1px solid var(--theme-border-color);
  background-color: var(--theme-elevation-50);

  code {
    background-color: unset;
    display: block;
  }
}

.logLines {
  display: flex;
  flex-direction: column;
  min-height: 100px;
}

.logLine {
  margin-bottom: 0;
  font-family: var(--font-geist-mono);
  font-size: 15px;
  display: flex;
  gap: 5px;
  letter-spacing: -0.5px;
  color: var(--theme-elevation-500);
  position: relative;

  p {
    margin-bottom: 0;
  }
}

.logTimestamp {
  margin-bottom: 0;
  flex-shrink: 0;
  color: var(--theme-elevation-500);
}

.lineMessage {
  color: var(--theme-text);

  @include mid-break {
    white-space: nowrap;
  }
}

.lineType--error,
.lineType--success,
.lineType--warning {
  .logText,
  .logTimestamp {
    color: inherit;
  }
  .logTimestamp {
    opacity: 0.5;
  }
}

.lineType--info {
  background-color: var(--highlight-info-bg-color);
  color: var(--highlight-info-text-color);
}
.lineType--error {
  background-color: var(--highlight-danger-bg-color);
  color: var(--highlight-danger-text-color);
}
.lineType--success {
  background-color: var(--highlight-success-bg-color);
  color: var(--highlight-success-text-color);
}
.lineType--warning {
  background-color: var(--highlight-warning-bg-color);
  color: var(--highlight-warning-text-color);
}

.logText {
  color: var(--theme-elevation-500);
}
.logTextAppearance--style {
  color: var(--theme-elevation-500);
}
.logTextAppearance--text {
  color: var(--theme-elevation-900);
}
